<script setup lang="ts">
import Write from './Writeed.vue'
import { ContentDetailWrap } from '@/components/ContentDetailWrap'
import { ref, unref } from 'vue'
import { modifyApi } from '@/api/logistics/course'
import { ElMessage } from 'element-plus'
const emit = defineEmits(['close', 'get-list'])

const writeRef = ref<ComponentRef<typeof Write>>()

const loading = ref(false)

const save = async () => {
  const write = unref(writeRef)
  write?.reset()
  emit('close')
  emit('get-list')
}
</script>

<template>
  <ContentDetailWrap title="路线编辑">
    <Write ref="writeRef" />

    <template #footer>
      <div class="w-full flex items-center justify-center">
        <!-- <BaseButton type="primary" :loading="loading" @click="save">保存</BaseButton> -->
        <BaseButton @click="save">取消</BaseButton>
      </div>
    </template>
  </ContentDetailWrap>
</template>
